const server = require('./server');
const Plugins = require('./config/plugin_config');


// Start the server
async function start() {
    try {
        await server.register(Plugins);
        await server.start();
    } catch (err) {
        console.log(err);
        process.exit(1);
    }
    console.log('Server running at:', server.info.uri);
};

process.on('unhandledRejection', (err) => {
    console.log(err);
    process.exit(1);
});

start();